using System.Windows;
using RevitCopilot.ViewModels;

namespace RevitCopilot.Views;

public partial class StartUpView : Window
{
    public StartUpView()
    {
        InitializeComponent();

        // 注册窗口关闭事件
        this.Closed += StartUpView_Closed;
    }

    private void StartUpView_Closed(object sender, System.EventArgs e)
    {
        // 停止定时器，防止内存泄漏
        if (DataContext is StartUpViewModel viewModel)
        {
            viewModel.Cleanup();
        }
    }
}